﻿// Shader-Based-Image-Processing (SBIP)
// http://code.google.com/p/sbip/
//
// Copyright © Frank Nagl, 2009-2011
// admin@franknagl.de
//
namespace SBIP.OptionsForms
{
    using System;
    using System.Windows.Forms;
    using Filter;

    /// <summary>Filter specified properties form.</summary>
    public partial class Convolution5x5Form : Form
    {
        private readonly Convolution5x5 filter;

        /// <summary>
        /// Initializes a new instance of the <see cref="Convolution3x3Form"/> class.
        /// </summary>
        /// <param name="processor">The processor.</param>
        public Convolution5x5Form(Processor processor)
        {
            InitializeComponent();
            filter = new Convolution5x5();
            processor.Filter = filter;
        }

        private void NumericUpDown1ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(0, (int) numericUpDown1.Value);
        }

        private void NumericUpDown2ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(1, (int)numericUpDown2.Value);
        }

        private void NumericUpDown3ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(2, (int)numericUpDown3.Value);
        }

        private void NumericUpDown4ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(3, (int)numericUpDown4.Value);
        }

        private void NumericUpDown5ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(4, (int)numericUpDown5.Value);
        }

        private void NumericUpDown6ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(5, (int)numericUpDown6.Value);
        }

        private void NumericUpDown7ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(6, (int)numericUpDown7.Value);
        }

        private void NumericUpDown8ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(7, (int)numericUpDown8.Value);
        }

        private void NumericUpDown9ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(8, (int)numericUpDown9.Value);
        }

        private void NumericUpDown10ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(9, (int)numericUpDown10.Value);
        }

        private void NumericUpDown11ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(10, (int)numericUpDown11.Value);
        }

        private void NumericUpDown12ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(11, (int)numericUpDown12.Value);
        }

        private void NumericUpDown13ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(12, (int)numericUpDown13.Value);
        }

        private void NumericUpDown14ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(13, (int)numericUpDown14.Value);
        }

        private void NumericUpDown15ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(14, (int)numericUpDown15.Value);
        }

        private void NumericUpDown16ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(15, (int)numericUpDown16.Value);
        }

        private void NumericUpDown17ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(16, (int)numericUpDown17.Value);
        }

        private void NumericUpDown18ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(17, (int)numericUpDown18.Value);
        }

        private void NumericUpDown19ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(18, (int)numericUpDown19.Value);
        }

        private void NumericUpDown20ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(19, (int)numericUpDown20.Value);
        }

        private void NumericUpDown21ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(20, (int)numericUpDown21.Value);
        }

        private void NumericUpDown22ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(21, (int)numericUpDown22.Value);
        }

        private void NumericUpDown23ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(22, (int)numericUpDown23.Value);
        }

        private void NumericUpDown24ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(23, (int)numericUpDown24.Value);
        }

        private void NumericUpDown25ValueChanged(object sender, EventArgs e)
        {
            filter.SetKernelCoefficient(24, (int)numericUpDown25.Value);
        }
    }
}
